package com.ctgu.A1_1;

public class Thoroughbred {
    private String mother;
    private String father;
    private int birthday;

    public Thoroughbred(String mother, String father, int birthday) {
        this.mother = mother;
        this.father = father;
        this.birthday = birthday;
    }

    //获取当前年龄
    public int getCurrentAge(){
        int currentYear=java.time.Year.now().getValue();
        return currentYear-birthday;
    }
    public String getMother() {
        return this.mother;
    }
    public String getFather() {
        return this.father;
    }
}
